<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>背景相关属性</title>
  <style>
    body{
      background-color: gray;
    }

    div{
      width: 400px;
      height: 400px;
      background-color: skyblue;
      border: 2px black solid;
      font-size: 40px;
      /* 背景图片 */
      background-image: url("../images/悟空.jpg");
      /* 背景图片重复方式 */
      background-repeat: no-repeat;
      /* 背景图片的位置 */
      background-position: center;
      /* 符合属性 */
      background: skyblue no-repeat;
    }
  </style>
</head>
<body>
  <div>你要加油啊</div>
  
</body>
</html>